<template>
  <div>
    <el-carousel :interval="4000" height="200px">
      <el-carousel-item v-for="item in imgList" :key="item.name">
        <img :src="item.src" style="height:100%;width:100%;" alt="图片丢失了" :title="item.title" />
        <!-- <div class="div-card-item" v-html="item">{{ item }}</div> -->
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script>
export default {
  components: {},
  data () {
    return {
      imgList: [
        // TODO: add by axiang [20190703] 滚动栏的内容设置为从数据库获取，暂时没有表，需要增加新表，待做
        // '福建工程学院在线编程实验系统',
        // '福建工程学院在线编程实验系统',
        // '福建工程学院在线编程实验系统'
        {
          name: "cover",
          src: require("@/assets/image/scenery/cover.png"),
          title: "this is cover.png"
        },
        {
          name: "river",
          src: require("@/assets/image/scenery/river.jpeg"),
          title: "this is river.jpeg"
        },
        {
          name: "sky",
          src: require("@/assets/image/scenery/sky.jpeg"),
          title: "this is sky.jpeg"
        }
      ]
    }
  }
}
</script>

<style scoped>
.el-carousel__item h3 {
  color: #475669;
  font-size: 14px;
  opacity: 0.75;
  line-height: 200px;
  margin: 0;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}

.div-card-item {
  width: 80%;
  margin-top: 5%;
  margin-left: 10%;
  font-size: 25px;
}
</style>
